package com.silences.servlet;

import com.alibaba.fastjson.JSON;
import com.silences.service.UserService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;
import java.util.Map;

@WebServlet("/getUsers2")
public class GetUserServlet2 extends HttpServlet {
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {

        //super.doGet(req,resp);
        //中文乱码问题解决
        req.setCharacterEncoding("UTF-8");
        resp.setCharacterEncoding("UTF-8");
        resp.setContentType("text/html;charset=utf-8");


        UserService us=new UserService();
        try {
             //Map<String,Object> map= us.getUsers(searchname,pageIndex,pageSize);
            Map<String, Object> map = null;
            //System.out.println(map.toString());//
            //resp.getWriter().write(JSON.toJSONString(map).toString());
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}
